<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" name="" id="textInput">

    <script src="../common/debounce.js"></script>
    <script>

        let inp = document.querySelector("#textInput")
        let handelr = debounce(function () {
            console.info(this.value, "耗时操作")
        }, 2000)
        inp.addEventListener("input", handelr)
    </script>
</body>

</html>